﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp8
{
    class Calculate
    {
        //protected int a = int.Parse(Console.ReadLine());
        //protected int b = int.Parse(Console.ReadLine());
        protected int a { get; set; }
        protected int b { get; set; }
        public Calculate(int a ,int b) {
            this.a = a;
            this.b = b;
        }
        public virtual void DisplayResult() {
            Console.WriteLine();
        }
    }
    class ADD : Calculate
    {
        public ADD(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a + b);
        }
    }
    class Reduce : Calculate {
        public Reduce(int a, int b) : base(a, b)
        {

        }
    public override void DisplayResult()
    {
        Console.WriteLine(a-b);
      }
    }

    class Multiplication : Calculate
    {
        public Multiplication(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a*b);
        }
    }

    class Divide : Calculate
    {
        public Divide(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a / b);
        }
    }
    class PublicCalculate {
        public static void PublicCalculatetest(Calculate  Calculate ) {
            Calculate.DisplayResult();
        }
    }
}